package com.jsh.frame.myframe2.activity;

import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.bigkoo.alertview.OnItemClickListener;
import com.jsh.frame.myframe2.R;
import com.jsh.frame.myframe2.utils.DialogUtil;

import butterknife.BindView;
import butterknife.OnClick;


public class MainActivity extends BaseActivity {

    String string = "289066900@qq.com";
    @BindView(R.id.tv_show)
    TextView tv;
    @BindView(R.id.edit)
    EditText editText;
    @BindView(R.id.button)
    Button button;
    @BindView(R.id.imageView)
    ImageView imageView;

    private Animation animationScale;

    @Override
    int getContentRes() {
        return R.layout.activity_main;
    }

    @Override
    void initView() {

        animationScale = AnimationUtils.loadAnimation(this, R.anim.scale);
        imageView.setAnimation(animationScale);
//
//        if (StringUtil.checkMobileNO(string)) {
//            Logger.d("通过验证");
//            logUtil.d("通过验证");
//            tv.setText("通过验证");
//        } else {
//            logUtil.d("未通过验证");
//            Logger.d("未通过验证");
//            tv.setText("未通过验证");
//        }
    }

    @Override
    void initData() {

    }

    @OnClick(R.id.button)
    void setOnClick() {
//        imageView.startAnimation(animationScale);
        DialogUtil dialogUtil = new DialogUtil.Builder().with(this).setTitle("提示").setOtions(new String[]{"吃肉", "喝酒"}).setOnButtonClickListener(new OnItemClickListener() {
            @Override
            public void onItemClick(Object o, int position) {

            }
        }).create();
        DialogUtil.show();


    }
}
